package com.eamois.action.sys;

import java.util.Collection;

import com.eamois.action.BaseAction;
import com.eamois.domain.sys.WorkCenter;
import com.eamois.service.sys.WorkCenterService;
import com.eamois.util.ServiceFactory;

public class WorkCenterAction extends BaseAction{
	private WorkCenterService workCenterService;
	
	public WorkCenterAction() {
		this.setWorkCenterService((WorkCenterService)ServiceFactory.getInstance().getBean("workCenterService"));
	}
	
	public Collection<WorkCenter> findAllWorkCenter() {
		return this.getWorkCenterService().findAllWorkCenter();
	}
	public boolean findWorkCenter(String id){
		return this.getWorkCenterService().findWorkCenter(id);
	}
	public Collection<WorkCenter> findWorkCenterByName(String name,boolean isLike){
		return this.getWorkCenterService().findWorkCenterByName(name,isLike);
	}
	public void saveWorkCenter(WorkCenter workCenter) {
		this.getWorkCenterService().save(workCenter);
	}
	
	public void removeWorkCenter(WorkCenter workCenter) {
		this.getWorkCenterService().remove(workCenter);
	}

	public WorkCenterService getWorkCenterService() {
		return workCenterService;
	}

	public void setWorkCenterService(WorkCenterService workCenterService) {
		this.workCenterService = workCenterService;
	}
}
